From 95ee65d17ae6f8e9ee3e488962b47d0874afca13 Mon Sep 17 00:00:00 2001 From: Juergen Gross Date: Wed, 23 Aug 2017 19:34:00 +0200 Subject: [PATCH] xen/common/domain.c: let custom parameter parsing routines return errno Modify the custom parameter parsing routines in: xen/common/domain.c to indicate whether the parameter value was parsed successfully. Signed-off-by: Juergen Gross Acked-by: Wei Liu Acked-by: Jan Beulich --- xen/common/domain.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xen/common/domain.c b/xen/common/domain.c index b22aacc57e..acd420a1a5 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -245,12 +245,15 @@ static int late_hwdom_init(struct domain *d) static unsigned int __read_mostly extra_hwdom_irqs; static unsigned int __read_mostly extra_domU_irqs = 32; -static void __init parse_extra_guest_irqs(const char *s) + +static int __init parse_extra_guest_irqs(const char *s) { if ( isdigit(*s) ) extra_domU_irqs = simple_strtoul(s, &s, 0); if ( *s == ',' && isdigit(*++s) ) extra_hwdom_irqs = simple_strtoul(s, &s, 0); + + return *s ? -EINVAL : 0; } custom_param("extra_guest_irqs", parse_extra_guest_irqs); -- 2.30.2